Structural Polymorphism

نویسنده

  • Fritz Ruehr
چکیده

This paper describes structural polymorphism, a new form of type polymorphism appropriate to functional languages featuring user-defined algebraic data types (e.g., Standard ML, Haskell and Miranda1). The approach extends the familiar notion of parametric polymorphism by allowing the definition of functions which are generic with respect to data structures as well as to individual types. For example, structural polymorphism accommodates generalizations of the usual length and map functions which may be applied not only to lists, but also to trees, binary trees or similar algebraic structures. Under traditional polymorphic type systems, these functions may be defined for arbitrary component types, but must be (laboriously) re-defined for every distinct data structure. In this sense, our approach also extends the spirit of parametric polymorphism, in that it provides the programmer relief from the burden of unnecessary repetitive effort. The mechanism we will use to realize this form of polymorphism is inspired by a feature familiar to functional programmers, namely the pattern abstraction. Pattern abstractions generalize the usual lambda abstraction (¬x.e) in that they are comprised of multiple pattern/expression clauses, rather than just a single bound-variable/expression pair. By analogy with pattern abstractions, we generalize polymorphic type abstractions (Òå.e) to type-pattern abstractions, which are comprised of multiple type-pattern/expression pairs. The types given to type-pattern abstractions are universally quantified, just as for traditional type abstractions, but the universal quantifiers are now justified by a recursive analysis of the forms of all possible type instantiations, rather than by parametric independence with respect to a type variable.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The BDNF Val66Met Polymorphism Affects the Vulnerability of the Brain Structural Network

Val66Met, a naturally occurring polymorphism in the human brain-derived neurotrophic factor (BDNF) gene resulting in a valine (Val) to methionine (Met) substitution at codon 66, plays an important role in neuroplasticity. While the effect of the BDNF Val66Met polymorphism on local brain structures has previously been examined, its impact on the configuration of the graph-based white matter stru...

متن کامل

Apolipoprotein E Polymorphism in an Iranian Hypercholestrolemic Population

Apolipoprotein E (apo E) is a structural constituent of several serum lipoprotein classes. It plays an important role in lipid metabolism by acting as a ligand for low-density lipoprotein (LDL) and chylomicron remnant receptors. Three common alleles called e2, e3 and e4 have been described, which code for three protein isoforms (E2, E3 and E4). The polymorphism is clinically significant, and it...

متن کامل

Differential Association of Cx37 and Cx40 Genetic Variants in Atrial Fibrillation with and without Underlying Structural Heart Disease

Atrial fibrillation (AF) appears in the presence or absence of structural heart disease. The majority of foci causing AF are located near the ostia of pulmonary veins (PVs), where cardiomyocytes and vascular smooth muscle cells interdigitate. Connexins (Cx) form gap junction channels and participate in action potential propagation. Genetic variants in genes encoding Cx40 and Cx37 affect their e...

متن کامل

Gene Polymorphism of Matrix Metalloproteinase 9 in Asthenozoospermic Male Subjects

Objective Matrix Metalloproteinase (MMPs) play important roles in the structural and functional properties of reproductive organs. The aim of this study is to determine the prevalence of C-1562T Matrix Metalloproteinase-9 (rs3918242) gene polymorphism in fertile and infertile men. In addition, we aimed to determine the association between C-1562T MMP-9 and G-1575A MMP-2 gene polymorphisms. Mate...

متن کامل

Structural basis for the protective effect of the human prion protein carrying the dominant-negative E219K polymorphism.

The most common form of prion disease in humans is sCJD (sporadic Creutzfeldt-Jakob disease). The naturally occurring E219K polymorphism in the HuPrP (human prion protein) is considered to protect against sCJD. To gain insight into the structural basis of its protective influence we have determined the NMR structure of recombinant HuPrP (residues 90-231) carrying the E219K polymorphism. The str...

متن کامل

External Polymorphism An Object Structural Pattern for Transparently Extending C++ Concrete Data Types

This paper describes the External Polymorphism pattern, which allows classes that are not related by inheritance and/or have no virtual methods to be treated polymorphically. This pattern combines C++ language features with patterns like Adapter and Decorator [1] to give the appearance of polymorphic behavior on otherwise unrelated classes. The External Polymorphism pattern has been used in a n...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998